import request from '@/utils/request'

// 查询菜品订单管理列表
export function listDishorder(query) {
  return request({
    url: '/system/dishorder/list',
    method: 'get',
    params: query
  })
}

// 查询菜品订单管理详细
export function getDishorder(id) {
  return request({
    url: '/system/dishorder/' + id,
    method: 'get'
  })
}
// 查询菜品订单管理详细
export function getDishorderByUserId(userId) {
  return request({
    url: '/system/dishorder/list/' + userId,
    method: 'get'
  })
}

// 新增菜品订单管理
export function addDishorder(data) {
  return request({
    url: '/system/dishorder',
    method: 'post',
    data: data
  })
}

// 修改菜品订单管理
export function updateDishorder(data) {
  return request({
    url: '/system/dishorder',
    method: 'put',
    data: data
  })
}
// 修改菜品订单状态
export function updateDishorderStatusById(id) {
  return request({
    url: '/system/dishorder/status/'+id,
    method: 'put'
  })
}

// 删除菜品订单管理
export function delDishorder(id) {
  return request({
    url: '/system/dishorder/' + id,
    method: 'delete'
  })
}
